package com.vvvtimes.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * *
 */
@AllArgsConstructor
@Getter
public enum PluginVersionEnum {
    PLUGIN_VERSION_2024_1_1("2024.1.1", "io.github.kings1990.plugin.fastrequest.view.inner.LicenseCheck", "checkCodeNotExist"),
    PLUGIN_VERSION_2023_2_3_1("2023.2.3.1", "io.github.kings1990.plugin.fastrequest.cofig.IlI1IIIII1l1IlIl1ll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_3("2023.2.3", "io.github.kings1990.plugin.fastrequest.cofig.IlI1IIIII1l1IlIl1ll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_2_4("2023.2.2.4", "io.github.kings1990.plugin.fastrequest.cofig.llll1IIIll1II11I", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_2_3("2023.2.2.3", "io.github.kings1990.plugin.fastrequest.cofig.I11l1IlIl1IIIlIll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_2_2("2023.2.2.2", "io.github.kings1990.plugin.fastrequest.cofig.I11l1IlIl1IIIlIll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_2_1("2023.2.2.1", "io.github.kings1990.plugin.fastrequest.cofig.I11l1IlIl1IIIlIll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_2("2023.2.2", "io.github.kings1990.plugin.fastrequest.cofig.I11l1IlIl1IIIlIll1", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_2_1_3("2023.2.1.3", "io.github.kings1990.plugin.fastrequest.cofig.I1lIl1lI1l1I1IlIIll", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_1_7_1("2023.1.7.1", "io.github.kings1990.plugin.fastrequest.cofig.I1III1lI1lI11I11", "IIl1lIl1111IlIlI1"),
    PLUGIN_VERSION_2023_1_6("2023.1.6", "io.github.kings1990.plugin.fastrequest.cofig.licence", "lIIlIlllIIIIIl11"),
    PLUGIN_VERSION_2023_1_3_2("2023.1.3.2", "io.github.kings1990.plugin.fastrequest.cofig.l11Il1III1111", "l111I1llllI"),
    PLUGIN_VERSION_2022_3_1("2022.3.1", "io.github.kings1990.plugin.fastrequest.cofig.goto", "true"),

    ;
    private String version;
    private String className;
    private String methodName;

    public static PluginVersionEnum fromCode(String code) {
        PluginVersionEnum[] statuses = PluginVersionEnum.values();
        for (PluginVersionEnum versionEnum : statuses) {
            if (versionEnum.getVersion()
                    .equals(code)) {
                return versionEnum;
            }
        }
        return PLUGIN_VERSION_2023_2_2_2;
    }
}
